const express = require('express')
const userRouter = express.Router()
// 引入验证
const userValidator = require('../middleware/validator/userValidator')
// 关于用户的逻辑处理
const userController = require('../controller/userController')
// 验证token
const {verifyToken} = require('../utils/jwt')

userRouter
    .post('/registers', userValidator.register, userController.register)
    .post('/logins', userValidator.login, userController.login)
    .post('/lists', verifyToken, userController.list)


module.exports = userRouter
